{if $full_page}
{include file="pageheader.htm"}
{insert_scripts files="../js/utils.js,listtable.js"}
<!-- 商品搜索 -->
<div class="form-div">
  <form action="javascript:searchStore()" name="searchForm" >
    <img src="images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" />
    {$lang.storeName} <input type="text" name="keywords" id="keywords" />
    <input type="submit" value="{$lang.button_search}" class="button" />
  </form>
</div>
<!-- 商品列表 -->
<form method="post" action="" name="listForm" onsubmit="return confirmSubmit(this)">
  <!-- start goods list -->
  <div class="list-div" id="listDiv">
{/if}
<table cellpadding="3" cellspacing="1">
  <tr>
    <th>
      <input onclick='listTable.selectAll(this, "checkboxes")' type="checkbox" />
      <a href="javascript:listTable.sort('id'); ">{$lang.record_id}</a>{$sort_id}
    </th>
    <th>{$lang.address}</th>
	<th>{$lang.tel}</th>
    <th><a href="javascript:listTable.sort('storeName'); ">{$lang.storeName}</a>{$sort_storeName}</th>
    <th><a href="javascript:listTable.sort('star'); ">{$lang.star}</a>{$sort_star}</th>
    <th>{$lang.handler}</th>
  <tr>
  {foreach from=$store_list item=store}
  <tr>
    <td><input type="checkbox" name="checkboxes[]" value="{$store.id}" />{$store.id}</td>
    <td class="first-cell"><span onclick="listTable.edit(this, 'edit_store_address', {$store.id})">{$store.address}</span></td>
    <td>{$store.tel}</td>
	<td><span onclick="listTable.edit(this, 'edit_store_name', {$store.id})">{$store.storeName}</span></td>
    <td align="right">{$store.star}</td>
    <td align="center">
      <a href="store.php?act=edit&id={$store.id}" title="{$lang.edit}"><img src="images/icon_edit.gif" border="0" height="16" width="16" /></a>&nbsp;
     <a href="javascript:;" onclick="listTable.remove({$store.id}, '{$lang.drop_confirm}')" title="{$lang.remove}"><img src="images/icon_drop.gif" border="0" height="16" width="16"></a></span>
    </td>
  </tr>
  {foreachelse}
  <tr><td class="no-records" colspan="10">{$lang.no_records}</td></tr>
  {/foreach}
</table>
<!-- end goods list -->
<!-- 分页 -->
<table id="page-table" cellspacing="0">
  <tr>
    <td align="right" nowrap="true">
    {include file="page.htm"}
    </td>
  </tr>
</table>
{if $full_page}
</div>
</form>
<script>
	listTable.recordCount = {$record_count};
	listTable.pageCount = {$page_count};
	
	{foreach from=$filter item=item key=key}
	listTable.filter.{$key} = '{$item}';
	{/foreach}
	console.info()
/* 搜索文章 */
 function searchStore()
 {
    listTable.filter.keywords = Utils.trim(document.forms['searchForm'].elements['keywords'].value);
    listTable.filter.page = 1;
    listTable.loadList();
 }
</script>
{include file="pagefooter.htm"}
{/if}
